package com.bdan.t382.entity;

import java.io.Serializable;
import java.util.*;

public class TypeEntity implements Serializable {
    private String expression; // 带个别特殊字符的表达式
private String code; // 大量特殊字符的代码
private Pet refPet; // 引用外部对象
private Pet innerPet; // JavaBean 类型
private String[] array; // 数组类型
private List<String> list; // List 类型
private Set<String> set; // Set 类型
private Map<String, String> map; // Map 类型
 private Properties props; // Properties 类型
 private String emptyValue; // 注入空字符串值
 private String nullValue = "初始有值，需设置为 null"; // 注入 null 值
 // 打印所有属性
        public void printAll(){
        System.out.println("expression：" + expression);
        System.out.println("code：" + code);
        if(refPet != null){
         refPet.introduce();
         }
        if(innerPet != null){
         innerPet.introduce();
         }
        System.out.println("array：" + Arrays.toString(array));
        System.out.println("list：" + list);
        System.out.println("set：" + set);
        System.out.println("map：" + map);
        System.out.println("props：" + props);
        System.out.println("emptyValue：" + emptyValue);
        System.out.println("nullValue：" + nullValue);
        }
    public TypeEntity() {

    }

    public TypeEntity(String expression, String code, Pet refPet, Pet innerPet, String[] array, List<String> list, Set<String> set, Map<String, String> map, Properties props, String emptyValue, String nullValue) {
        this.expression = expression;
        this.code = code;
        this.refPet = refPet;
        this.innerPet = innerPet;
        this.array = array;
        this.list = list;
        this.set = set;
        this.map = map;
        this.props = props;
        this.emptyValue = emptyValue;
        this.nullValue = nullValue;
    }

    public String getExpression() {
        return expression;
    }

    public void setExpression(String expression) {
        this.expression = expression;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Pet getRefPet() {
        return refPet;
    }

    public void setRefPet(Pet refPet) {
        this.refPet = refPet;
    }

    public Pet getInnerPet() {
        return innerPet;
    }

    public void setInnerPet(Pet innerPet) {
        this.innerPet = innerPet;
    }

    public String[] getArray() {
        return array;
    }

    public void setArray(String[] array) {
        this.array = array;
    }

    public List<String> getList() {
        return list;
    }

    public void setList(List<String> list) {
        this.list = list;
    }

    public Set<String> getSet() {
        return set;
    }

    public void setSet(Set<String> set) {
        this.set = set;
    }

    public Map<String, String> getMap() {
        return map;
    }

    public void setMap(Map<String, String> map) {
        this.map = map;
    }

    public Properties getProps() {
        return props;
    }

    public void setProps(Properties props) {
        this.props = props;
    }

    public String getEmptyValue() {
        return emptyValue;
    }

    public void setEmptyValue(String emptyValue) {
        this.emptyValue = emptyValue;
    }

    public String getNullValue() {
        return nullValue;
    }

    public void setNullValue(String nullValue) {
        this.nullValue = nullValue;
    }
}
